package com.zc.basic.domain.dto.rpt;

import com.zc.basic.domain.pojo.rpt.RptCommonColumn;

import java.util.ArrayList;
import java.util.List;

public class RptColumnNode extends RptCommonColumn {

    private Integer line;
    private Integer begin;
    private Integer end;
    private List<RptCommonColumn> children;

    public List<RptCommonColumn> getChildren() {
        return children;
    }

    public void setChildren(List<RptCommonColumn> children) {
        this.children = children;
    }

    public RptCommonColumn getCurrent() {
        return super.getSelf();
    }

    public Integer getLine() {
        return line;
    }

    public void setLine(Integer line) {
        this.line = line;
    }

    public Integer getBegin() {
        return begin;
    }

    public void setBegin(Integer begin) {
        this.begin = begin;
    }

    public Integer getEnd() {
        return end;
    }

    public void setEnd(Integer end) {
        this.end = end;
    }

    public void addChild(RptCommonColumn rptCommonColumn) {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        this.children.add(rptCommonColumn);
    }

}
